package com.atguigu.spzx.user.client;

import com.atguigu.spzx.model.pojo.h5.UserInfo;
import com.atguigu.spzx.model.pojo.user.Region;
import com.atguigu.spzx.model.pojo.user.UserAddress;
import com.atguigu.spzx.model.vo.common.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient("service-user")
public interface UserFeignClient {
    @GetMapping("/api/user/userInfo/auth/toAuthUser/{token}")
    public UserInfo getUserInfoByToken(@PathVariable("token") String token);

    @GetMapping("/api/user/region/getRegionByCode/{code}")
    public Result<Region> getRegionByCode(@PathVariable("code")String code);

    @GetMapping("/api/user/userAddress/auth/getUserAddress/{id}")
    public Result<UserAddress> findUserAddress(@PathVariable("id")Integer id);
}
